<?php
namespace app\index\controller;
use app\index\model\User;
use think\Controller;
use think\Session;
class Users{
    public function index(){
        $information = new User();
        try{
            $user = $information->login();
            Session::set('user',$user);
            return['status'=>true,'user'=>$user];
        }catch (\Exception $e){
            return['status'=>false,'error'=>$e->getMessage()];
        }
    }
}
